package com.recource.util;

import com.recource.domain.Users;
import org.springframework.stereotype.Component;

@Component
public class HostHolder {
    private ThreadLocal<Users> users = new ThreadLocal<Users>();
    public void setUser(Users users) {
        this.users.set(users);
    }
    public Users getUser() {
        return users.get();
    }
    public void clear() {
        users.remove();
    }
}
